/**
 */
package html5.attributes.impl;

import html5.attributes.AttributesPackage;
import html5.attributes.data_;

import html5.impl.AttributeImpl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>data </b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link html5.attributes.impl.data_Impl#getExtendedName <em>Extended Name</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class data_Impl extends AttributeImpl implements data_ {
	/**
	 * The default value of the '{@link #getExtendedName() <em>Extended Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExtendedName()
	 * @generated
	 * @ordered
	 */
	protected static final String EXTENDED_NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getExtendedName() <em>Extended Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExtendedName()
	 * @generated
	 * @ordered
	 */
	protected String extendedName = EXTENDED_NAME_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected data_Impl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return AttributesPackage.Literals.DATA_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getExtendedName() {
		return extendedName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExtendedName(String newExtendedName) {
		String oldExtendedName = extendedName;
		extendedName = newExtendedName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, AttributesPackage.DATA___EXTENDED_NAME, oldExtendedName, extendedName));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case AttributesPackage.DATA___EXTENDED_NAME:
				return getExtendedName();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case AttributesPackage.DATA___EXTENDED_NAME:
				setExtendedName((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case AttributesPackage.DATA___EXTENDED_NAME:
				setExtendedName(EXTENDED_NAME_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case AttributesPackage.DATA___EXTENDED_NAME:
				return EXTENDED_NAME_EDEFAULT == null ? extendedName != null : !EXTENDED_NAME_EDEFAULT.equals(extendedName);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (extendedName: ");
		result.append(extendedName);
		result.append(')');
		return result.toString();
	}

} //data_Impl
